<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>FileInput</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- fileinput.css -->
    <link href="css/fileinput.min.css" rel="stylesheet">
</head>
<body>
    <div>
        <input type="file" id="file" name="file" class="file-loading">
    </div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-3.2.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<!-- fileinput.js -->
<script src="js/fileinput.min.js"></script>
<script src="js/zh.js"></script>
<script>
    $(function () {
        $("#file").fileinput({
            language : "zh",//设置语言
            uploadUrl: "/upload/excel",
            browseClass: "btn btn-primary", //按钮样式
            allowedFileExtensions: ["xls", "xlsx"],
            msgUploadThreshold: '处理中...',
            msgUploadBegin: '初始化...',
            msgUploadEnd: '完成',
            dropZoneTitle: "拖拽文件到这里",
            previewFileIcon: '<i class="glyphicon glyphicon-file"></i>'
        });
    });
</script>
</body>
</html>